<template>
	<!-- 赛事直播 -->
	<view>
		<liveHead :background="background" @getDate="getDate"></liveHead>
		<view class="holder1"></view>
		<liveList :listData="liveList"></liveList>
	</view>
</template>

<script>
	var util = require('../../common/util.js')
	import uniIcons from "@/components/uni-icons/uni-icons.vue"
	import uniNavBar from "@/components/uni-nav-bar/uni-nav-bar.vue"
	import liveList from "../components/liveList.vue"
	import liveHead from "../components/liveHead.vue"
	export default {
		components: {
			uniNavBar,
			uniIcons,
			liveList,
			liveHead
		},
		data() {
			return {
				liveList: [],
				background:'#fff',
			};
		},
		onShow() {
			
		},
		methods: {
			getDate(e){
				uni.showToast({
					title:'加载中',
					icon:'loading'
				})
				this.request({
					url: '/czb/football_live/footballLiveList',
					method: 'POST',
					data: {
						'date': e.date,
						'type': e.type,
						'store_id': 1
					},
				}).then((ret) => {
					console.log(ret);
					if (ret.code == 0) {
						uni.hideToast()
						this.liveList = ret.data
					}
				})
			},
			fnGoBack() {
				uni.navigateBack()
			},
			fnToLiveDetail() {
				uni.navigateTo({
					url: "/pages/live-detail/live-detail"
				})
			}
		},
		onPullDownRefresh() {
			console.log('refresh');
			setTimeout(function() {
				uni.stopPullDownRefresh();
			}, 1000);
		}
	}
</script>

<style lang="scss" scoped>
	.holder1 {
		width: 100%;
		height: 108rpx;
	}

	.content-top {
		position: fixed;
		height: 108rpx;
		width: 100%;
		background: #FFFFFF;
		padding: 0 20rpx;
		box-sizing: border-box;
		color: #333;
		font-size: 24rpx;
		z-index: 9999;
	}
</style>
